import Vue from 'vue'
import App from './App'
import {
	API
} from './until/api.js'

// 请求器挂载
uni.$req = new API('http://www.uinav.com/api/public/v1', function() {
	uni.showLoading({
		title: '加载中'
	})
}, function() {
	uni.hideLoading()
})

// 封装弹框的方法
uni.$showMsg = function(title = '数据请求失败', isSuccess = false) {
	uni.showToast({
		title,
		icon: isSuccess ? 'success' : 'none'
	})
}



Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
	...App
})
app.$mount()
